package sample;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * Created by lilongfei on 2016/12/15.
 */
public class DataHolder {

    private static Map<String,Object> dataMap = Maps.newConcurrentMap();

    public static void setDataMap(String name,Object data){
        dataMap.put(name,data);
    }

    public static void clearDataMap(){
        dataMap.clear();
    }

    public static void clearData(String... name){
        dataMap.remove(name);
    }

    public static Object getData(String name){
        return dataMap.get(name);
    }
}
